package com.yanqu.road.server.timer.match;

import com.yanqu.road.server.manager.match.CrossMatchMgr;
import com.yanqu.road.server.manger.MatchServerGroupMgr;
import com.yanqu.road.utils.ConfigHelper;
import com.yanqu.road.utils.executor.GeneralTask;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.List;

/**
 * @author ：zfr
 * @date ：2021/2/4 10:44
 * 初始化赛事定时器
 */
public class MatchTask extends GeneralTask {
    protected Logger logger = LogManager.getLogger(MatchTask.class.getName());
    private boolean isRun = false;
    @Override
    public void doRun() {
//        if (!isRun) {
//            try {
//                isRun = true;
//                List<Long> groupIdList = MatchServerGroupMgr.getOpenGroupIdList(ConfigHelper.getInt("channelId"));
//                CrossMatchMgr.checkMatchInit(groupIdList);
//            } catch (Exception e) {
//                logger.error(e.getMessage(), e);
//            } finally {
//                isRun = false;
//            }
//        }
    }
}
